package com.iampzh.springvue.listener;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.iampzh.springvue.entity.Role;
import com.iampzh.springvue.entity.User;
import com.iampzh.springvue.mapper.RoleMapper;
import com.iampzh.springvue.mapper.UserMapper;


public class RoleExcelReadListener extends AnalysisEventListener<Role> {
    private RoleMapper roleMapper;




    public RoleExcelReadListener(RoleMapper roleMapper) {
        this.roleMapper = roleMapper;
    }



    @Override
    public void invoke(Role role, AnalysisContext analysisContext) {

           roleMapper.insert(role);


    }



    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }


}
